# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libkexiv2
pkgver=20.04.3
pkgrel=0
pkgdesc="A library to manipulate pictures metadata"
url="https://www.kde.org/applications/graphics"
arch="all !armhf" # extra-cmake-modules
license="GPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev exiv2-dev"
subpackages="$pkgname-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/libkexiv2-$pkgver.tar.xz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="88846e87b64e2b0b213afc2765af69e4fb034caa6708f73db3f6180bb52e34a1e6ea14f06416f939ef66ed16cf0e1a43b03d6452eabe0cb24c40faddf39376a9  libkexiv2-20.04.3.tar.xz"
